Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HasOneThrough / HasManyThrough relationships #172

Merged
merged 12 commits into from
Apr 12, 2024

Conversation

mjauvin
Copy link
Member

@mjauvin mjauvin commented Mar 22, 2024

Fixes wintercms/winter#1086

Take count & scope relation configs into account.

Also pass the relation name to the constructor.

@mjauvin
Copy link
Member Author

mjauvin commented Mar 22, 2024

@goldmont, can you test if this works for you ?

Keep in mind your scope will need to fully qualify its field names if they are not unique since this created a join query between multiple tables.

@mjauvin
Copy link
Member Author

mjauvin commented Mar 22, 2024

@bennothommo phpstan is complaining about a method that does not exist even though it does.

Not sure about the error on Windows, though...

@goldmont
Copy link

@goldmont, can you test if this works for you ?

Keep in mind your scope will need to fully qualify its field names if they are not unique since this created a join query between multiple tables.

Hi,

It works now!

@mjauvin mjauvin requested a review from LukeTowers March 25, 2024 15:25
@goldmont
Copy link

@mjauvin When will it be released? Thanks.

@mjauvin
Copy link
Member Author

mjauvin commented Mar 27, 2024

@mjauvin When will it be released? Thanks.

Not sure. It should be easy to get merged to dev-develop, released is another story as there are no release planned short term.

@goldmont
Copy link

@mjauvin When will it be released? Thanks.

Not sure. It should be easy to get merged to dev-develop, released is another story as there are no release planned short term.

Ok, understanding 👍🏻

@mjauvin
Copy link
Member Author

mjauvin commented Mar 27, 2024

@bennothommo did I ever tell you how much I hate phpstan ? 😛

It's running fine locally now, but barfs in github workflow (see screenshot below):

image

@bennothommo
Copy link
Member

@mjauvin which PHP version are you running it on? The GitHub Actions one runs it on PHP 8.2

@bennothommo
Copy link
Member

Absolutely no idea why ignoring the KeyGenerateCommand file in Foundation made it work, but it did, so go team!

@mjauvin
Copy link
Member Author

mjauvin commented Mar 28, 2024

@mjauvin which PHP version are you running it on? The GitHub Actions one runs it on PHP 8.2

Most likely 8.3 but I'll need to check tomorrow

@mjauvin
Copy link
Member Author

mjauvin commented Mar 28, 2024

@mjauvin which PHP version are you running it on? The GitHub Actions one runs it on PHP 8.2

As I thought, this was using php 8.3:

[r4l@ahs5] ~/winter/storm $ php -v
PHP 8.3.4 (cli) (built: Mar 15 2024 14:04:12) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.4, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.4, Copyright (c), by Zend Technologies

@mjauvin mjauvin added this to the 1.2.6 milestone Mar 28, 2024
@LukeTowers LukeTowers merged commit 51a8916 into develop Apr 12, 2024
8 checks passed
@LukeTowers LukeTowers deleted the fix-through-relations branch April 12, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Count parameter not working with Has-Many-Through relation
4 participants